package top.iflyoung.cim.biz.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import top.iflyoung.cim.biz.entity.ChatGroup;
import top.iflyoung.cim.biz.mapper.ChatGroupMapper;
import top.iflyoung.cim.biz.service.ChatGroupService;
import top.iflyoung.cim.common.util.VerifyUtil;

/**
 * @author liguiyang
 * @description
 * @sine 1.8
 * @date 2021/9/222:47
 **/
@Service("chatGroupService")
public class ChatGroupServiceImpl extends ServiceImpl<ChatGroupMapper, ChatGroup> implements ChatGroupService {

    public Long addAndGetId(ChatGroup group) {
        if (VerifyUtil.isEmpty(group)) {
            return -1L;
        }
        return baseMapper.insertAndGetId(group);
    }
}
